/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-3-18 下午3:26 Created by dwzhang
 */
package com.jade.modules.cms;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 与用户相关的实体对象，例如评论、收藏等等。
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-3-18 下午3:26
 */
//@MappedSuperclass
public abstract class CmsUserEntity implements Serializable
{
    public static final String ETYPE_TOPIC = "topic";
    public static final String ETYPE_CONTENT = "content";

    //用户类型
    @Column (name = "user_type", updatable = false, length = 32)
    private String userType;
    //用户标识
    @Column (name = "user_id", updatable = false, length = 64)
    private String userId;
    //用户名称
    @Column (name = "user_name", length = 64, updatable = false)
    private String userName;
    //操作的实体类型, content 内容  topic 专题
    @Column (name = "entity_type", nullable = false, updatable = false)
    private String entityType = ETYPE_CONTENT;
    //操作的实体标识
    @Column (name = "entity_id", nullable = false, updatable = false)
    private long entityId;
    //操作的时间
    @Column (name = "creation_date", nullable = false, updatable = false)
    private Date creationDate;

    public String getUserType()
    {
        return userType;
    }

    public void setUserType(String userType)
    {
        this.userType = userType;
    }

    public String getUserId()
    {
        return userId;
    }

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserName()
    {
        return userName;
    }

    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getEntityType()
    {
        return entityType;
    }

    public void setEntityType(String entityType)
    {
        this.entityType = entityType;
    }

    public long getEntityId()
    {
        return entityId;
    }

    public void setEntityId(long entityId)
    {
        this.entityId = entityId;
    }

    public Date getCreationDate()
    {
        return creationDate;
    }

    public void setCreationDate(Date creationDate)
    {
        this.creationDate = creationDate;
    }
}
